home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-03-14 | 4.9 KB | 205 lines | [TEXT/Earl] |
- ; EMACS.RC: Startup file for MicroEMACS 3.8
- ;
- ; This file is executed everytime the
- ; editor is entered
-
- ;If you have a keyboard with an escape key or a clear key, you may
- ;remove or comment out the next line or two. (I have a Mac Plus
- ;keyboard myself, but I don't like the position of the clear=escape
- ;key too much.)
-
- ;bind-to-key meta-prefix `
- ;bind-to-key execute-named-command ^[
-
- ; ***** Rebind the Function key group
-
- ;bind-to-key search-forward FN1
- ;bind-to-key search-reverse FN2
- ;bind-to-key hunt-forward FN3
- ;bind-to-key hunt-backward FN4
- ;bind-to-key next-window FN5
- ;bind-to-key execute-macro FN6
- ;bind-to-key find-file FN7
- ;bind-to-key execute-file FN8
- ;bind-to-key save-file FN9
- ;bind-to-key exit-emacs FN0
-
-
- ; toggle function key window off
- 1 store-macro
- save-window
- 1 next-window
- !if &sequal "Function Keys" $cbufname
- delete-window
- !endif
- bind-to-key execute-macro-14 M-T
- !force restore-window
- write-message "[Function key window OFF]"
- !endm
- bind-to-key execute-macro-1 M-T
- ; toggle function key window back on
- 14 store-macro
- 1 next-window
- !if &sequal $cbufname "emacs.hlp"
- execute-macro-11
- !endif
- !if ¬ &sequal $cbufname "Function Keys"
- 1 split-current-window
- select-buffer "Function Keys"
- !force 5 resize-window
- beginning-of-file
- !endif
- bind-to-key execute-macro-1 M-T
- 2 next-window
- write-message "[Function key window ON]"
- !endm
-
- ; Enter Help
- 2 store-macro
- 1 next-window ;Make sure the function key window isn't up!
- !if &sequal $cbufname "Function Keys"
- delete-window
- bind-to-key execute-macro-14 M-T
- !endif
- help
- 8 resize-window
- bind-to-key execute-macro-12 ^Z
- bind-to-key execute-macro-13 ^V
- bind-to-key execute-macro-11 M-?
- bind-to-key execute-macro-15 ^XO
- bind-to-key execute-macro-15 ^XP
- bind-to-key execute-macro-15 FN5
- beginning-of-file
- 2 forward-character
- clear-message-line
- !endm
- bind-to-key execute-macro-2 M-?
- ; Exit Help
- 11 store-macro
- bind-to-key previous-page ^Z
- bind-to-key next-page ^V
- bind-to-key execute-macro-2 M-?
- bind-to-key next-window ^XO
- bind-to-key previous-window ^XP
- bind-to-key next-window FN5
- delete-window
- clear-message-line
- !endm
-
- ; don't allow these commands from within the HELP screen
- 15 store-macro
- write-message "[Use M-? to exit HELP]!!"
- !endm
-
- ; last help page
- 12 store-macro
- beginning-of-line
- search-reverse "=>"
- 1 redraw-display
- !endm
-
- ; next help page
- 13 store-macro
- beginning-of-line
- 2 forward-character
- search-forward "=>"
- 1 redraw-display
- !endm
-
- ; reformat indented paragraph
-
- 6 store-macro
- write-message " [Fixing paragraph]"
- kill-region
- 2 split-current-window
- select-buffer "[temp]"
- yank
- beginning-of-file
- replace-string "~n " "~n"
- write-message " [Fixing paragraph]"
- 66 set-fill-column
- write-message " [Fixing paragraph]"
- fill-paragraph
- 77 set-fill-column
- beginning-of-file
- handle-tab
- replace-string ~n "~n "
- write-message " [Fixing paragraph]"
- end-of-file
- 2 delete-previous-character
- beginning-of-file
- set-mark
- write-message " [Fixing paragraph]"
- end-of-file
- kill-region
- unmark-buffer
- delete-window
- yank
- delete-buffer "[temp]"
- write-message " [Fixed paragraph]"
- !endm
- bind-to-key execute-macro-6 ^XQ
- ; indent region
-
- 7 store-macro
- write-message " [Indenting region]"
- kill-region
- 2 split-current-window
- select-buffer "[temp]"
- yank
- beginning-of-file
- handle-tab
- replace-string "~n" "~n "
- end-of-file
- 4 delete-previous-character
- beginning-of-file
- set-mark
- write-message " [Indenting region]"
- end-of-file
- kill-region
- unmark-buffer
- delete-window
- yank
- delete-buffer "[temp]"
- write-message " [Region Indented]"
- !endm
- bind-to-key execute-macro-7 ^XI
- ; undent region
-
- 8 store-macro
- write-message " [Undenting region]"
- kill-region
- 2 split-current-window
- select-buffer "[temp]"
- yank
- beginning-of-file
- delete-next-character
- replace-string "~n " "~n"
- end-of-file
- 2 delete-previous-character
- beginning-of-file
- set-mark
- write-message " [Undenting region]"
- end-of-file
- kill-region
- unmark-buffer
- delete-window
- yank
- delete-buffer "[temp]"
- write-message " [Region undented]"
- !endm
- bind-to-key execute-macro-8 ^XU
- ; bring up the function key window
-
- 1 split-current-window
- select-buffer "Function Keys"
- 5 resize-window
- insert-string "^1 search ^2 search back | M-T toggle function list M-? help (toggle)~n"
- insert-string "^3 hunt ^4 hunt back | M-A find command/apropos ^X? describe key~n"
- insert-string "^5 next window ^6 exec macro | M-Q reformat paragraph ^XQ ref undented region~n"
- insert-string "^7 find file ^8 desc keys | ^Xi indent region ^XU undent region~n"
- insert-string "^9 save file ^0 exit emacs | M-, show memory M-X extended command~n"
- beginning-of-file
- unmark-buffer
- next-window
-